function prior = SIGEprior(pars_e)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This is part of the set of files that accompany the article:       %
%Mankiw, N. Gregory and Ricardo Reis (2007) "Sticky Information in  %
%General Equilibrium," Journal of the European Economic Association,%
%forthcoming. See the appendix of the NBER or CEPR working paper    %
%versions for a detailed explanation of the algorithms.             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Please cite if you use the programs. I do not provide tech support.%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Last revised: August 30, 2006                                      %
%Written by: Ricardo Reis                                           %
%Input: parameters being estimated                                  %
%Output: prior probability                                          %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

global Ppar

%Probability of coming from prior for all 11 parameters
prior=gampdf(pars_e(1)-1,Ppar(1,1),inv(Ppar(2,1)));
prior=prior*gampdf(pars_e(2)-1,Ppar(1,2),inv(Ppar(2,2)));
prior=prior*betapdf(pars_e(3),Ppar(1,3),Ppar(2,3));
prior=prior*betapdf(pars_e(5),Ppar(1,5),Ppar(2,5));
prior=prior*betapdf(pars_e(7),Ppar(1,7),Ppar(2,7));
prior=prior*gampdf(1/pars_e(4),0.5*Ppar(1,4),inv(0.5*Ppar(1,4)*Ppar(2,4)));
prior=prior*gampdf(1/pars_e(6),0.5*Ppar(1,6),inv(0.5*Ppar(1,6)*Ppar(2,6)));
prior=prior*gampdf(1/pars_e(8),0.5*Ppar(1,8),inv(0.5*Ppar(1,8)*Ppar(2,8)));
if pars_e(9)>1; prior = 0; end
if pars_e(10)>1; prior = 0; end
if pars_e(11)>1; prior = 0; end
if pars_e(9)<0; prior = 0; end
if pars_e(10)<0; prior = 0; end
if pars_e(11)<0; prior = 0; end